<template>
  <div class="adminCustomBox">
    <div class="customPersonal">
      <div class="personalHead">
        <img src="../../static/image/icon-avatar.png" alt="">
        <router-link to="admin-custom-index" class="personalReturn">ansonchiang@hotail.com</router-link>
      </div>
      <div class="public-header">
        <div class="public-header-ch">管理员账号</div>
        <div class="public-header-line"></div>
      </div>
      <div class="personalSearch">
        <el-input placeholder="输入账号或姓名进行搜索"></el-input>
        <img src="../../static/image/god-sousuo.png" alt="">
      </div>
      <div style="clear:both;"></div>
      <div class="personalNav">
        <div class="personalChange">
          <span :class="{'personalActive':personalShow=='总管理员'}" @click="personalShow='总管理员'">总管理员</span>
          <span :class="{'personalActive':personalShow=='子管理员'}" @click="personalShow='子管理员'">子管理员</span>
        </div>
      </div>
      <!-- 总管理员 start-->
      <div v-if="personalShow == '总管理员'">
        <div class="personalCreate">
          <!-- <span><img src="../../static/image/god-tianjia.png" alt="">添加总管理员</span> -->
          <router-link to="admin-custom-all"><span><img src="../../static/image/god-tianjia.png" alt="">添加总管理员</span></router-link>
        </div>
        <div class="personalTable">
          <table>
            <thead>
              <tr>
                <th>登录邮箱</th>
                <th>公司名称</th>
                <th>创建时间</th>
                <th>已购课程</th>
                <th>可上课人数</th>
                <th>账号启用</th>
                <th></th>
              </tr>
            </thead>
            <tbody>
              <tr v-for="(admin,adminIndex) in adminList" :key='adminIndex'>
                <td>{{admin.loginEmail}}</td>
                <td>{{admin.conpanyName}}</td>
                <td>{{admin.createTime}}</td>
                <td>{{admin.alreadyBuy}}</td>
                <td>{{admin.canClass}}</td>
                <td>
                  <el-switch
                    v-model="admin.value"
                    width="70"
                    active-color="#70788f"
                    inactive-color="#70788f">
                  </el-switch>
                </td>
                <td>
                  <!-- <el-button class="personalSet">设置</el-button> -->
                  <router-link to="admin-custom-total" class="personalSet">设置</router-link>
                </td>
              </tr>
              <!-- <tr>
                <td>ansonchiang@hotail.com</td>
                <td>百度分公司</td>
                <td>2016年5月18</td>
                <td>MarkSimoe</td>
                <td>百度总公司</td>
                <td>30</td>
                <td>
                  <el-switch
                    v-model="value3"
                    width="70"
                    active-color="#70788f"
                    inactive-color="#70788f">
                  </el-switch>
                </td>
                <td><el-button class="personalSet">设置</el-button></td>
              </tr> -->
            </tbody>
          </table>
        </div>
        <!-- 翻页 -->
        <div class="personalPagination">
          <el-pagination
            small
            layout="prev, pager, next"
            :total="50">
          </el-pagination>
        </div>
      </div>
      <!-- 总管理员 ending-->
      <!-- 子管理员 start-->
      <div v-if="personalShow == '子管理员'">
        <div class="personalCreate">
          <!-- <span><img src="../../static/image/god-tianjia.png" alt="">添加子管理员</span> -->
          <router-link to="admin-custom-setup"><span><img src="../../static/image/god-tianjia.png" alt="">添加子管理员</span></router-link>
        </div>
        <div class="personalTable">
          <table>
            <thead>
              <tr>
                <th>登录邮箱</th>
                <th>公司名称</th>
                <th>创建时间</th>
                <th>已购课程</th>
                <th>上级管理点</th>
                <th>可上课人数</th>
                <th>账号启用</th>
                <th></th>
              </tr>
            </thead>
            <tbody>
              <tr v-for="(personal,index) in personalList" :key='index'>
                <td>{{personal.loginEmail}}</td>
                <td>{{personal.conpanyName}}</td>
                <td>{{personal.createTime}}</td>
                <td>{{personal.alreadyBuy}}</td>
                <td>{{personal.upAdmin}}</td>
                <td>{{personal.canClass}}</td>
                <td>
                  <el-switch
                    v-model="personal.value"
                    width="70"
                    active-color="#70788f"
                    inactive-color="#70788f">
                  </el-switch>
                </td>
                <td>
                  <!-- <el-button class="personalSet">设置</el-button> -->
                  <router-link to="admin-custom-information" class="personalSet">设置</router-link>
                </td>
              </tr>
              <!-- <tr>
                <td>ansonchiang@hotail.com</td>
                <td>百度分公司</td>
                <td>2016年5月18</td>
                <td>MarkSimoe</td>
                <td>百度总公司</td>
                <td>30</td>
                <td>
                  <el-switch
                    v-model="value3"
                    width="70"
                    active-color="#70788f"
                    inactive-color="#70788f">
                  </el-switch>
                </td>
                <td><el-button class="personalSet">设置</el-button></td>
              </tr> -->
            </tbody>
          </table>
        </div>
        <!-- 翻页 -->
        <div class="personalPagination">
          <el-pagination
            small
            layout="prev, pager, next"
            :total="50">
          </el-pagination>
        </div>
      </div>
        <!-- 子管理员 ending-->
    </div>
  </div>
</template>
<script>
  export default {
    data(){
      
      return{
        personalShow:'总管理员',
        value:false,
        adminList:[
          {
            loginEmail:'ansonchiang@hotail.com',
            conpanyName:'百度分公司',
            createTime:'2016年5月18',
            alreadyBuy:'MarkSimoe',
            canClass:'30',
            value: 1,
            // accountOpening:'',
            // setUp:'',
          },
          {
            loginEmail:'ansonchiang@hotail.com',
            conpanyName:'谷歌分公司',
            createTime:'2016年5月18',
            alreadyBuy:'MarkSimoe',
            canClass:'30',
            value: 2,
            // accountOpening:'',
            // setUp:'',
          },
        ],
        personalList:[
          {
            loginEmail:'ansonchiang@hotail.com',
            conpanyName:'百度分公司',
            createTime:'2016年5月18',
            alreadyBuy:'MarkSimoe',
            upAdmin:'百度总公司',
            canClass:'30',
             value: 3,
            // accountOpening:'',
            // setUp:'',
          },
          {
            loginEmail:'ansonchiang@hotail.com',
            conpanyName:'谷歌分公司',
            createTime:'2016年5月18',
            alreadyBuy:'MarkSimoe',
            upAdmin:'谷歌总公司',
            canClass:'30',
             value: 4,
            // accountOpening:'',
            // setUp:'',
          },
        ]
      }
    },
    computed:{
      
    },
    methods:{
       
    },
    created(){

    },
    mounted(){
     
    },
  }
</script>

